<?php

namespace common\models\credit_public_tables;

use Yii;

/**
 * This is the model class for table "{{%sl_city}}".
 *
 * @property int $id
 * @property string $state
 * @property string $city
 * @property string $sz_code
 * @property string $Rome
 * @property string $zm_code
 * @property int $display
 * @property int $c_order
 * @property string $admittance_bank 准入银行
 * @property string $unadmittance_branch 准入网点
 * @property int $jzg_id 精真估城市id
 */
class SlCity extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%sl_city}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_public');
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['display', 'c_order', 'jzg_id'], 'integer'],
            [['c_order'], 'required'],
            [['unadmittance_branch'], 'string'],
            [['state', 'city'], 'string', 'max' => 45],
            [['sz_code'], 'string', 'max' => 6],
            [['Rome', 'zm_code'], 'string', 'max' => 50],
            [['admittance_bank'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'state' => Yii::t('app', 'State'),
            'city' => Yii::t('app', 'City'),
            'sz_code' => Yii::t('app', 'Sz Code'),
            'Rome' => Yii::t('app', 'Rome'),
            'zm_code' => Yii::t('app', 'Zm Code'),
            'display' => Yii::t('app', 'Display'),
            'c_order' => Yii::t('app', 'C Order'),
            'admittance_bank' => Yii::t('app', '准入银行'),
            'unadmittance_branch' => Yii::t('app', '准入网点'),
            'jzg_id' => Yii::t('app', '精真估城市id'),
        ];
    }
}
